home *** CD-ROM | disk | FTP | other *** search
/ Champak 141 / (Vol 141) Oct 17 2011.iso / Games / gamma-bros.swf / scripts / __Packages / classes / fx / Randoms.as < prev    next >
Encoding:
Text File  |  2011-10-17  |  1.0 KB  |  31 lines

  1. class classes.fx.Randoms
  2. {
  3.    var num;
  4.    var freq;
  5.    var typeArray;
  6.    var c;
  7.    var c2;
  8.    var Name = "randoms";
  9.    function Randoms(pnum, pfreq, ptypeArray)
  10.    {
  11.       this.num = pnum;
  12.       this.freq = pfreq;
  13.       this.typeArray = ptypeArray.slice();
  14.       this.c = 0;
  15.       this.c2 = this.freq + _root.randRange(-1 * this.freq,this.freq);
  16.       this.c2 *= 1 / _root.dif.speed;
  17.    }
  18.    function main()
  19.    {
  20.       this.c = this.c + 1;
  21.       if(this.c >= this.c2)
  22.       {
  23.          var _loc3_ = random(4);
  24.          _root.createWaveCreator([10,_root.randRange(_root.posArray2[_loc3_][0],_root.posArray2[_loc3_][1]),_root.randRange(_root.posArray2[_loc3_][2],_root.posArray2[_loc3_][3]),this.typeArray[random(this.typeArray.length)],random(this.num) + 1,[_root.dirArray[_loc3_],_root.randRange(100,500),"break"],[["free"],["free"],["free"],["free"],["free"],["free"]]]);
  25.          this.c = 0;
  26.          this.c2 = this.freq + _root.randRange(-1 * this.freq,this.freq);
  27.          this.c2 *= 1 / _root.dif.speed;
  28.       }
  29.    }
  30. }
  31.